package com.fau.hm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 话务队列表
 * @author dangjh
 * 2015年1月9日 上午2:12:34
 */
@Entity
@Table(name = "medical_enterprise_queue")
public class MedicalEnterpriseQueue implements Serializable, JSONAware {

	private static final long serialVersionUID = 9165509370994663520L;

	private String id;
	private String queueId;
	private Integer queueNo;
	private String eid;
	
	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "queue_id", length = 32)
	public String getQueueId() {
		return queueId;
	}

	public void setQueueId(String queueId) {
		this.queueId = queueId;
	}

	@Column(name = "queue_no", length = 7)
	public Integer getQueueNo() {
		return queueNo;
	}

	public void setQueueNo(Integer queueNo) {
		this.queueNo = queueNo;
	}
	
	@Column(name = "eid", length = 32)
	public String getEid() {
		return eid;
	}

	public void setEid(String eid) {
		this.eid = eid;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj = new JSONObject();
		obj.put("id", id);
		obj.put("queueId", queueId);
		obj.put("queueNo", queueNo);
		obj.put("eid", eid);
		return obj.toJSONString();
	}

}
